package CreateThread;
public class Method4 {
    //创建一个匿名内部类,实现runnable
    public static void main(String[] args) {
        Thread t = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("hello world");
            }
        });
        t.start();
    }
}

